/*#include <stdio.h>
#include <string.h>
int main()
{
	char str[10];
	printf("Please enter a string:\n");
	scanf("%s",str);
	if(strcmp(str,"Monday")==0)
	printf("%s is %d\n",str,1);
		else if(strcmp(str,"Tuesday")==0)
		printf("%s is %d\n",str,2);
			else if(strcmp(str,"Wednesday")==0)
			printf("%s is %d\n",str,3);
				else if(strcmp(str,"Thursday")==0)
				printf("%s is %d\n",str,4);
					else if(strcmp(str,"Friday")==0)
					printf("%s is %d\n",str,5);
						else if(strcmp(str,"Saturday")==0)
						printf("%s is %d\n",str,6);
							else if(strcmp(str,"Sunday")==0)
							printf("%s is %d\n",str,0);
								else
								printf("Not found!\n");
	return 0;
}*/

#include <stdio.h>
#include <string.h>
#define WEEKDAYS 7
#define MAX_STR_LEN 10
int main()
{	   	  	 	 	 	 
    int i, pos;
    int findFlag = 0;
    char x[MAX_STR_LEN];
    char weekDay[][MAX_STR_LEN] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};

    printf("Please enter a string:\n");
    scanf("%s", x);

    for (i = 0; i < WEEKDAYS && !findFlag; i++)
    {	   	  	 	 	 	 
        if (strcmp(x, weekDay[i]) == 0)
        {	   	  	 	 	 	 
            pos = i;
            findFlag = 1;
        }
    }

    if (findFlag)
    {	   	  	 	 	 	 
        printf("%s is %d\n", x, pos);
    }
    else
    {	   	  	 	 	 	 
        printf("Not found!\n");
    }
    return 0;
}
